<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Data.Member"%>
<section id="content" class="gray-area">
    <div class="container car-detail-page">
        <div class="row">
            <div id="main" class="col-md-9">
                <div class="tab-container">
                    <ul class="tabs">
                        <li class="active">
                            <a  data-toggle="tab">Profile</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div style="min-height: 500px; " class="tab-pane fade in active" id="car-details">
                            <form action="../MemberPR" method="post" name="frmLogin">
                                <table border='0'style="font-size: 16px; margin-left: 100px;" >
                                    <%
                                        Member ct = new Member();
                                        ArrayList<Member> a = ct.MselectByUser((String) session.getAttribute("ssusercl"));
                                        if (a.size() > 0) {
                                            for (int i = 0; i < a.size(); i++) {
                                                Member pay = a.get(i);
                                                SimpleDateFormat sdf = new SimpleDateFormat("dd/MMM/yyyy");
                                                out.print("<input type='hidden' name='txtMemcl' id='txtMemcl' value='" + pay.getMemberID() + "' /></td>");
                                    %>
                                    <tr>
                                        <td height="40" width='20%'> &nbsp;</td>
                                        <td> &nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>

                                    <tr>
                                        <td height="40" width='20%'>Fullname: &nbsp;&nbsp;</td>
                                        <%out.println("<td><input type='text' style='width: 200px; height: 30px; background: #f5f5f5; border: #ccc 1px solid;' required name='txtFullnamecl' value='" + pay.getMemberName() + "' /></td>");%>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>Email: &nbsp;&nbsp;</td>
                                        <%out.println("<td><input type='email' style='width: 200px; height: 30px; background: #f5f5f5; border: #ccc 1px solid;' required name='txtEmailcl' value='" + pay.getEmail() + "' /></td>");%>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>Telephone: &nbsp;&nbsp;</td>
                                        <%out.println("<td><input type='number' style='width: 200px; height: 30px; background: #f5f5f5; border: #ccc 1px solid;' required name='txtPhonecl' value='" + pay.getPhone() + "' /></td>");%>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>Gender: &nbsp;&nbsp;</td>
                                        <td>
                                            <select name="txtgendercl"   class="txtgendercl">
                                                <% if (pay.getGender().equalsIgnoreCase("1")) {
                                                        out.print("<option value='1' selected='selected'>Male</option>");
                                                        out.print("<option value='2'>Female</option>");
                                                    } else {
                                                        out.print("<option value='1'>Male</option>");
                                                        out.print("<option value='2' selected='selected'>Female</option>");
                                                    }
                                                %>
                                            </select>
                                        </td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>Address: &nbsp;&nbsp;</td>
                                        <%out.println("<td><textarea required rows='5' style='width: 400px' name='txtAddresscl'>" + pay.getAddress() + "</textarea></td>");%>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>Birthday: &nbsp;&nbsp;</td>
                                        <%out.println("<td><input type='date' style='width: 200px; height: 30px; background: #f5f5f5; border: #ccc 1px solid;' required name='txtBirthdaycl' value='" + pay.getBirthday() + "' /></td>");%>
                                        <td>&nbsp;</td>
                                    </tr>


                                    <tr>
                                        <td height="40" width='20%'>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td height="40" width='20%'>&nbsp;<input type='submit'  style='  float: left;background:  #00A8FF; border: none; width: 120px; height: 40px; color: #fff;' value='Update' name='btnUpdate'/></td>
                                        <td>
                                            <% out.println("<div style='float:left;'><a href='index.jsp?page=ChangePass&MemID="+pay.getMemberID()+"' style='background:  #00A8FF;  width: 180px; height: 40px; float: left; text-align: center; padding-top: 10px; font-size: 16px; color: #fff;'>Change Password</a> </div> &nbsp;"); %>
                                             <% out.println("<div style='float:left; margin-left:10px;'><a href='index.jsp?page=HistoryEnroll&MemID="+pay.getMemberID()+"' style='background:  #00A8FF;  width: 180px; height: 40px; float: left; text-align: center; padding-top: 10px; font-size: 16px; color: #fff;'>EnrollEvent History</a></div>"); %>
                                        </td>
                                        <td>&nbsp;</td>
                                    </tr>

                                    <%

                                            }
                                        }%>
                                </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <jsp:include page="menu-right.jsp" />
        </div>
    </div>
</section>